With the accelerating growth of Internet and intranet communication, high-bandwidth applications (such as streaming video), and large information databases, the need for networked storage systems has increased dramatically. System performance, data protection, and cost have been some of the main concerns in designing networked storage systems. In the past, many systems have used fibre channel drives because of their speed and reliability. However, fibre channel drives are also very costly. Integrated drive electronics (IDE) drives are much cheaper in terms of dollars per gigabyte of storage; however, their reliability is inferior to that of fibre channel drives. Furthermore, IDE drives require cumbersome 40-pin cable connections and are not easily replaceable when a drive fails. Serial advanced technology attachment (ATA) drives that use the same receptor as their fibre channel counterparts are now available. These drives, therefore, have the speed required for acceptable system performance and are hot-swappable, meaning that failed drives are easily replaced with new ones. Furthermore, they provide more storage than fibre channel drives at a much lower cost. However, serial ATA drives still do not offer the same reliability as fibre channel drives. Thus, there is an industry push to develop high-capacity storage devices that are low cost and extremely reliable.
To improve data reliability, many computer systems implement a redundant array of independent disk (RAID) system, which is a disk system that includes a collection of multiple disk drives organized into a disk array and managed by a common array controller. The array controller presents the array to the user as one or more virtual disks. Disk arrays are the framework to which RAID functionality is added in functional levels to produce cost-effective, highly available, high-performance disk systems.
In RAID systems, the data is distributed over multiple disk drives to allow parallel operation, thereby enhancing disk access performance and providing fault tolerance against drive failures. Currently, a variety of RAID levels from RAID level 0 through RAID level 6 have been specified in the industry. RAID levels 1 through 5 provide a single drive fault tolerance. That is, these RAID levels allow reconstruction of the original data if any one of the disk drives fails. It is quite possible, however, that more than one serial ATA drive may fail in a RAID system. For example, dual drive failures are becoming more common as RAID systems incorporate an increasing number of less expensive disk drives.
To provide, in part, a dual fault tolerance to such failures, the industry has specified a RAID level 6. The RAID 6 architecture is similar to RAID 5, but RAID 6 can overcome the failure of any two disk drives by using an additional parity block for each row (for a storage loss of 2/N). The first parity block (P) is calculated by performing an exclusive OR (XOR) operation on a set of assigned data chunks. Likewise, the second parity block (Q) is generated by using the XOR function on a set of assigned data chunks. When a pair of disk drives fails, the conventional dual-fault tolerant RAID systems reconstruct the data of the failed drives using the parity sets. The RAID systems are well known in the art and are amply described, for example, in The RAIDbook, 6th Edition: A Storage System Technology Handbook, edited by Paul Massiglia (1997), which is incorporated herein by reference.
An examplary dual parity scheme performs an XOR operation on horizontal rows of drive sectors to generate P parity and then performs an XOR operation on diagonal patterns of sectors in order to create Q parity. In general, these systems require a prime number of drives and a prime number of sectors per drive in order to perform. For example, Table 1 (below) shows the sector used for performing the P and Q parity calculations for sector 1 in a 11+2 disk configuration. As illustrated, there are 11 data drives (A, B, C, D, E, F, G, H, I, and J) and 2 parity drives (K and L), each having 11 sectors (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10). The sectors used as data sources for the calculation of the P parity appear in bold, while the sectors used as data sources for the calculation of the Q parity are underlined.
TABLE 1P and Q parity calculationsParityData DrivesDrivesABCDEFGHIJKLSector 0A0Sector 1A1B1 C1D1E1F1G1H1I1J1P1Q1Sector 2J2Sector 3I3Sector 4H4Sector 5G5Sector 6F6Sector 7E7Sector 8D8Sector 9C9Sector 10B10
In Table 1, it can be seen that P parity is calculated as an XOR of sectors spanning a horizontal row across each of the data drives. For example, in sector 1, the P parity P1 is calculated as an XOR of sector 1 of each of the data drives, i.e., sectors A1, B1, C1, D1, E1, F1, G1, H1, I1, and J1. Table 1 also shows that the Q parity is calculated as an XOR spanning a diagonal of sectors from each of the data drives. For example, in sector 1, the Q parity Q1 is calculated as an XOR spanning the diagonal of sectors A0, B10, C9, D8, E7, F6, G5, H4, I3, and J2.
An examplary dual parity algorithm is found in U.S. Pat. No. 6,453,428, entitled, “Dual-drive fault tolerant method and system for assigning data chunks to column parity sets.” The '428 patent describes a method and system for assigning data chunks to column parity sets in a dual-drive fault tolerant storage disk drive system having N disk drives, where N is a prime number. Each of the N disk drives is organized into N chunks such that the N disk drives are configured as one or more N×N array of chunks. The array has chunks arranged in N rows from row 1 to row N and in N columns from column 1 to column N. Each row includes a plurality of data chunks for storing data, a column parity chunk for storing a column parity set, and a row parity chunk for storing a row parity set. These data chunks are assigned in a predetermined order. The data chunks in each row are assigned to the row parity set. Each column parity set is associated with a set of data chunks in the array, wherein row m is associated with column parity set Qm, where m is an integer that ranges from 1 to N. For row 1 of a selected N×N array, a first data chunk is assigned to a column parity set Qi, wherein i is an integer determined by rounding down (N/2). For each of the remaining data chunks in row 1, each data chunk is assigned to a column parity set Qj, wherein j is an integer one less than the column parity set for the preceding data chunk and wherein j wraps to N when j is equal to 0. For each of the remaining rows 2 to N of the selected array, a first logical data chunk is assigned to a column parity set Qk, wherein k is one greater than the column parity set for the first logical data chunk in a preceding row and wherein k wraps to 1 when k is equal to (N+1). For each of the remaining data chunks in rows 2 to N, each data chunk is assigned to a column parity set Qn, wherein n is an integer one less than a column parity set for the preceding data chunk and wherein n wraps to N when n is equal to 0.
The algorithm described in the '428 patent safeguards against losing data in the event of a dual drive failure. However, performing the algorithm described uses excess processing cycles that may otherwise be utilized for performing system storage tasks. Hence, the '428 patent describes a suitable dual parity algorithm for calculating dual parity and for restoring data from a dual drive failure, yet it fails to provide an optimized hardware system capable of performing the dual parity algorithm without affecting system performance. When one data sector changes, multiple Q parity sectors also have to change. If the data chunk size is equal to one or more sectors, it leads to system inefficiencies for random writes. Since parity calculations operate on an entire sector of data, each sector is read into a buffer. As the calculations continue, it may be necessary to access the buffer several times to reacquire sector data, even if that data had been used previously in the parity generation hardware. There is, therefore, a need for an effective means of calculating parity such that the storage system is fault tolerant against a dual drive failure, provides optimal performance by improving buffer bandwidth, and is further capable of generating parity for differing data sector sizes.
Therefore, it is an object of the present invention to provide optimal hardware that minimizes buffer bandwidth requirements for dual parity calculation.
It is yet another object of the present invention to provide a programmable dual parity generator with minimal design complexity.